#include <stdio.h>

int fact(int n);

int main(void) {
    int m, k, p;
    printf("Please input two numbers:");
    scanf("%d%d", &m, &k);
    p = fact(m) /( (fact(k) * fact(m - k)));
    printf("p=%d\n", p);
    return 0;
}

/* 定义阶乘函数fact */
int fact(int n) {
    int i;
    int result = 1;

    for (i = 2; i <= n; i++) {
        result *= i;
    }
    printf("fact(%d)=%d\n", n, result);
    return result;
}